package com.azzcs.controller;

import com.azzcs.dto.User;
import com.azzcs.myrpc.client.RpcClient;
import com.azzcs.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wzg
 * @Date: 2021/1/23 下午10:30
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IUserService userService;

    @GetMapping("/sayHello")
    public String sayHello(@RequestBody User user){
        String result = userService.sayHello(user);
        System.out.println(result);
        return result;
    }
}
